
	<!-- 当前所在位置 START -->
	{include file="_url.here.tpl"}
	<!-- 当前所在位置 END -->

	<!-- 主体区 -->
	<div class="area">

		<!-- 主体左边区 START -->
		<div class="aleft">
			
			<!-- 左边导航栏 START -->
			
{include file='./user/_user.nav.tpl'}
			<!-- 左边导航栏 END -->
			
		</div>
		<!-- 主体左边区 END -->

		<!-- 主体右边区 START -->
		<div class="aright">

			<form id="fm_email" action="./index.php?frm=user&mdl=email&do=bind" method="post" target="ajax">
				<input type="hidden" name="resend" id="resend" value="0" />

				<!-- 绑定邮箱 START -->
				<div class="sl_t_block bdcolor-red key-item">
					<div class="tt">
						<h2 class="color-red">绑定邮箱</h2>
					</div>
					<div class="main-block pattern_line_right">
						<dl><dt>用户名：</dt><dd>{$_userinfo.username}</dd>
							<div class="clear"></div></dl>
						{if $_userinfo.email != ''}
						<dl>
							<dt>原邮箱：</dt><dd>{$_userinfo.email}</dd>
							<div class="clear"></div>
						</dl>
						{/if}
						<dl>
							<dt>新邮箱：</dt><dd><input type="text" name="email" id="email" class="input" style="width:480px;" /></dd>
							<div class="clear"></div>
						</dl>
					</div>
				</div>
				<!-- 绑定邮箱 END -->

				<div class="space20"></div>

				<div class="tcenter">
					<input type="submit" name="formAction" value="绑定" class="btn-main" />
				</div>
			</form>

		</div>
		<!-- 主体右边区 END -->

	</div>

	<script type="text/javascript" language="JavaScript" charset="utf-8">
	<!--
	　　{literal}
		var email = '';
	　　jQuery(function($){
			$('#fm_email').submit(function(evt){
				email = $.trim($('#email').val());
				if(email == '' || /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/i.test(email) == false){
					evt.iscancelled = true;	// 阻止其他事件
					showmsg_warning('未输入新邮箱地址或格式不正确！');
					return false;
				}
				return true;
			});
	　　});

		function resend(){
			$('#resend').val('1');
			$('#fm_email').trigger('submit');
		}

		function callback_email_bind(params){
			$('#resend').val('0');
			if(params.result == 'succ'){
				var href = 'http://mail.'+((email.split('@')).pop());
				var html = ['邮箱绑定成功!'];
				html.push('系统已向你的邮箱【'+email+'】发送了一封验证邮件，请验证。');
				html.push('前往您的邮箱：<a href="'+href+'" target="_blank">'+href+'</a>');
				html.push('<a href="#" onclick="resend();return false;">未收到邮件，重新发送！</a>');
				params.msg = html.join('<br />');
				params.ttl = 600000;
			}
			callback_common(params);
		}
		{/literal}
	//-->
	</script>